#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
#include <limits>
using namespace std;

int main() {
    string num;
    cin >> num;
    string::iterator ptr = num.begin();
    int cnt = 0;
    while (ptr != num.end())
    {
        ptr++;
        cnt++;
        if (cnt == 3 && ptr != num.end())
        {
            cnt = 0;
            num.insert(ptr, ',');
            ptr++;
        }
    }
    for (auto& e : num)
    {
        cout << e;
        e++;
    }
}